Optimal. Leaf size=330 \[ -\frac {i (a-i b)^{3/2} (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {i (a+i b)^{3/2} (c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{4 \sqrt {b} \sqrt {d} f}+\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 3.19, antiderivative size = 330, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 9, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {3651, 3728,
3736, 6857, 65, 223, 212, 95, 214} \begin {gather*} \frac {\left (3 a^2 d^2+18 a b c d+b^2 \left (3 c^2-8 d^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{4 \sqrt {b} \sqrt {d} f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {(5 a d+3 b c) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}-\frac {i (a-i b)^{3/2} (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {i (a+i b)^{3/2} (c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 95
Rule 212
Rule 214
Rule 223
Rule 3651
Rule 3728
Rule 3736
Rule 6857
Rubi steps
\begin {align*} \int (a+b \tan (e+f x))^{3/2} (c+d \tan (e+f x))^{3/2} \, dx &=\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {1}{2} \int \frac {\sqrt {c+d \tan (e+f x)} \left (\frac {1}{2} \left (4 a^2 c-b^2 c-3 a b d\right )+2 \left (2 a b c+a^2 d-b^2 d\right ) \tan (e+f x)+\frac {1}{2} b (3 b c+5 a d) \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx\\ &=\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\int \frac {-\frac {1}{4} b \left (5 b^2 c^2+14 a b c d-a^2 \left (8 c^2-5 d^2\right )\right )+4 b (b c+a d) (a c-b d) \tan (e+f x)+\frac {1}{4} b \left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \tan ^2(e+f x)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx}{2 b}\\ &=\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\text {Subst}\left (\int \frac {-\frac {1}{4} b \left (5 b^2 c^2+14 a b c d-a^2 \left (8 c^2-5 d^2\right )\right )+4 b (b c+a d) (a c-b d) x+\frac {1}{4} b \left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) x^2}{\sqrt {a+b x} \sqrt {c+d x} \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 b f}\\ &=\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\text {Subst}\left (\int \left (\frac {b \left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right )}{4 \sqrt {a+b x} \sqrt {c+d x}}+\frac {2 (b (a c-b c-a d-b d) (a c+b c+a d-b d)+2 b (b c+a d) (a c-b d) x)}{\sqrt {a+b x} \sqrt {c+d x} \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{2 b f}\\ &=\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\text {Subst}\left (\int \frac {b (a c-b c-a d-b d) (a c+b c+a d-b d)+2 b (b c+a d) (a c-b d) x}{\sqrt {a+b x} \sqrt {c+d x} \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{b f}+\frac {\left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\text {Subst}\left (\int \left (\frac {-2 b (b c+a d) (a c-b d)+i b (a c-b c-a d-b d) (a c+b c+a d-b d)}{2 (i-x) \sqrt {a+b x} \sqrt {c+d x}}+\frac {2 b (b c+a d) (a c-b d)+i b (a c-b c-a d-b d) (a c+b c+a d-b d)}{2 (i+x) \sqrt {a+b x} \sqrt {c+d x}}\right ) \, dx,x,\tan (e+f x)\right )}{b f}+\frac {\left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {c-\frac {a d}{b}+\frac {d x^2}{b}}} \, dx,x,\sqrt {a+b \tan (e+f x)}\right )}{4 b f}\\ &=\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\left (i (a-i b)^2 (c-i d)^2\right ) \text {Subst}\left (\int \frac {1}{(i+x) \sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left (i (a+i b)^2 (c+i d)^2\right ) \text {Subst}\left (\int \frac {1}{(i-x) \sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \text {Subst}\left (\int \frac {1}{1-\frac {d x^2}{b}} \, dx,x,\frac {\sqrt {a+b \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{4 b f}\\ &=\frac {\left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{4 \sqrt {b} \sqrt {d} f}+\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}+\frac {\left (i (a-i b)^2 (c-i d)^2\right ) \text {Subst}\left (\int \frac {1}{-a+i b-(-c+i d) x^2} \, dx,x,\frac {\sqrt {a+b \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\left (i (a+i b)^2 (c+i d)^2\right ) \text {Subst}\left (\int \frac {1}{a+i b-(c+i d) x^2} \, dx,x,\frac {\sqrt {a+b \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{f}\\ &=-\frac {i (a-i b)^{3/2} (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {i (a+i b)^{3/2} (c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}+\frac {\left (18 a b c d+3 a^2 d^2+b^2 \left (3 c^2-8 d^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{4 \sqrt {b} \sqrt {d} f}+\frac {(3 b c+5 a d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 f}+\frac {b \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(2566\) vs. \(2(330)=660\).
time = 6.14, size = 2566, normalized size = 7.78 \begin {gather*} \text {Result too large to show} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \left (a +b \tan \left (f x +e \right )\right )^{\frac {3}{2}} \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (e + f x \right )}\right )^{\frac {3}{2}} \left (c + d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________